

public class Market {
	Fruit [] fruitList;
	String name;
	int  holdTime;
	double fruitPrice;
	double buyFruitAmount;
	
	public double getBuyFruitAmount() {
		return buyFruitAmount;
	}
	public void setBuyFruitAmount(double buyFruitAmount) {
		this.buyFruitAmount = buyFruitAmount;
	}
	public Fruit sell(String fruitName,int holdTime,double fruitPrice,double buyFruitAmount){
		for(int i=0;i<fruitList.length;i++){
			String _fruitName = fruitList[i].getName();
			if(_fruitName.equals(fruitName)){
				return fruitList[i];
			}
			
			
		}
		
		return null;
		
	}
	public Fruit[] getFruitList() {
		return fruitList;
	}
	public void setFruitList(Fruit[] fruitList) {
		this.fruitList = fruitList;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getHoldTime() {
		return holdTime;
	}
	public void setHoldTime(int holdTime) {
		this.holdTime = holdTime;
	}
	public double getFruitPrice() {
		return fruitPrice;
	}
	public void setFruitPrice(double fruitPrice) {
		this.fruitPrice = fruitPrice;
	}

}
